package com.mybatisplus.sunpineshop.works.controller;


import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.mybatisplus.common.core.Result;
import com.mybatisplus.sunpineshop.works.entity.SUser;
import com.mybatisplus.sunpineshop.works.service.SUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  用户系统模块
 * </p>
 *
 * @author jobob
 * @since 2021-02-25
 */
@RestController
@RequestMapping("/api/admin_sys/users")
//@CrossOrigin
public class SUserController {
    @Autowired
    private SUserService sUserService;
    /**
     * @Author GongXl
     * @Description 用户管理-获得用户集合
     * @Date 2021/3/3 11:49
     * @Param []
     * @return com.mybatisplus.common.core.Result
     **/
    @RequestMapping("/getUserList")
    public Result getUserList(Integer pagenum,Integer pagesize){
        IPage<SUser> userList = sUserService.getUserList(pagenum, pagesize);
        Result res = Result.success("用户列表", userList);
        return res;
    }

}

